package edu.kaist.cs442.server.locationalpush.common.mobile;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Indexed;
import com.google.code.morphia.utils.IndexDirection;
import org.bson.types.ObjectId;


/**
 * Created by IntelliJ IDEA.
 * User: duyleekun
 * Date: 2/26/12
 * Time: 3:11 PM
 * To change this template use File | Settings | File Templates.
 */

@Entity
public class MobileVO {
	@Id
	ObjectId mid;

	@Indexed(unique = true, name = "uuid")
	String uuid;


	@Indexed(IndexDirection.GEO2D)
	protected double[] location = null;

	String registrationId;

	public MobileVO() {
	}

    public MobileVO(String uuid, double latitude, double longitude) {
        this.uuid = uuid;
	    location = new double[] {latitude,longitude};
    }

    public MobileVO(String uuid, String registrationId) {
        this.uuid = uuid;
        this.registrationId = registrationId;
    }


	public double[] getLocation() {
		return location;
	}

	public void setLocation(double[] location) {
		this.location = location;
	}

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getRegistrationId() {
        return registrationId;
    }

    public void setRegistrationId(String registrationId) {
        this.registrationId = registrationId;
    }

	@Override
	public String toString() {
		return uuid.toString();
	}
}
